// 用户相关接口请求
import request from '@/utils/request'

export function reqlogin(data) {
  return request({
    url: '/Manage/Login',
    // url: '/vue-admin-template/user/login',
    method: 'post',
    data
  })
}
// login优化写法
// export const reqlogin = (data) => request({
//   url: '/vue-element-admin/user/login',
//   method: 'post',
//   data
// })
// login优化写法2.0
// export const reqlogin = (data) => request.post('/vue-element-admin/user/login', data)

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}
